home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmiSoft / Dev / misc / WHDLoad_dev.lha / WHDLoad / Src / resource / macros.s < prev    next >
Encoding:
Text File  |  2003-11-08  |  10.1 KB  |  326 lines

  1. ************************************************************************
  2. * $Id: macros.s 1.5 2003/11/08 15:12:45 wepl Exp wepl $
  3. ************************************************************************
  4.  
  5.     INCLUDE    Includes:exec/types.i
  6.  
  7. ;Symbol Numbers
  8.     ENUM    0
  9.     EITEM    SN_Slave
  10.     EITEM    SN_SlaveFlags
  11.     EITEM    SN_Resload
  12.     EITEM    SN_TermReason
  13.     EITEM    SN_Tags
  14.     EITEM    SN_SetCPUFlags
  15.     EITEM    SN_Patch
  16.     EITEM    SN_PatcherBase
  17.     EITEM    SN_PatcherTags
  18.  
  19. ;Macros numbers
  20.     ENUM    40
  21.     EITEM    MN_LoadWHDSymbols
  22.     EITEM    MN_DisassembleSlave1
  23.     EITEM    MN_DisassembleSlave4
  24.     EITEM    MN_DisassembleSlave8
  25.     EITEM    MN_DisassembleSlave10
  26.     EITEM    MN_DisassembleSlave16
  27.     EITEM    MN_DisassembleSlaveData
  28.  
  29. ;Load Symbol
  30. LDSYM    MACRO
  31.     dc.w    \1
  32.     dc.w    (.e\@-.s\@)
  33. .s\@    dc.b    '\2',0
  34.     EVEN
  35. .e\@
  36.     ENDM
  37.  
  38. ;Make String
  39. MKSTR    MACRO
  40.     dc.w    (.e\@-.s\@)
  41. .s\@    dc.b    '\1',0
  42.     EVEN
  43. .e\@
  44.     ENDM
  45.  
  46. ************************************************************************
  47. _LoadWHDSymbols
  48.     dc.l    MN_LoadWHDSymbols
  49.     dc.l    .macroend-.macrostart
  50.     dc.b    'Load WHDLoad Symbols    '
  51. .macrostart
  52.     LDSYM    759+SN_Slave,<rs:mysyms/WHDLoadSlave>
  53.     LDSYM    759+SN_SlaveFlags,<rs:mysyms/WHDLoadSlaveFlags>
  54.     LDSYM    759+SN_Resload,<rs:mysyms/WHDLoadResload>
  55.     LDSYM    759+SN_TermReason,<rs:mysyms/WHDLoadTermReason>
  56.     LDSYM    759+SN_Tags,<rs:mysyms/WHDLoadTags>
  57.     LDSYM    759+SN_SetCPUFlags,<rs:mysyms/WHDLoadSetCPUFlags>
  58.     LDSYM    759+SN_Patch,<rs:mysyms/WHDLoadPatch>
  59.     LDSYM    759+SN_PatcherBase,<rs:mysyms/PatcherBase>
  60.     LDSYM    759+SN_PatcherTags,<rs:mysyms/PatcherTags>
  61.     dc.w    0
  62. .macroend
  63. ************************************************************************
  64. _DisassembleSlave1
  65.     dc.l    MN_DisassembleSlave1
  66.     dc.l    .macroend-.macrostart
  67.     dc.b    'Disassemble Slave 1-3   '
  68. .macrostart
  69.     dc.w    21    ; CURSOR/Absolute/Start of file
  70.     dc.w    $001D    ; LABELS/Create single/Label
  71.     MKSTR    <ws>
  72.     dc.w    86    ; */Convert specific EA''s/Set base #1
  73.  
  74.     dc.w    $000E    ; DISPLAY/Set data type/Code
  75.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  76.     MKSTR    <ws_Security>
  77.     dc.w    $820A    ; CURSOR/Relative/Next line * 2
  78.  
  79.     dc.w    $0013    ; DISPLAY/Set data type/Longs
  80.     dc.w    $820A    ; CURSOR/Relative/Next line * 2
  81.     dc.w    $0014    ; DISPLAY/Set data type/Words
  82.     dc.w    $8209    ; CURSOR/Relative/Previous line * 2
  83.     dc.w    $000B    ; DISPLAY/Set data type/ASCII
  84.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  85.     MKSTR    <ws_ID>
  86.     dc.w    $810A    ; CURSOR/Relative/Next line * 1
  87.  
  88.     dc.w    $005C    ; DISPLAY/Set Numeric base/Decimal
  89.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  90.     MKSTR    <ws_Version>
  91.     dc.w    $810A    ; CURSOR/Relative/Next line * 1
  92.  
  93.     dc.w    732+SN_SlaveFlags    ; SYMBOLS/User-defined symbols/#2
  94.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  95.     MKSTR    <ws_Flags>
  96.     dc.w    $810A    ; CURSOR/Relative/Next line * 1
  97.  
  98.     dc.w    $0013    ; DISPLAY/Set data type/Longs
  99.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  100.     MKSTR    <ws_BaseMemSize>
  101.     dc.w    $810A    ; CURSOR/Relative/Next line * 1
  102.  
  103.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  104.     MKSTR    <ws_ExecInstall>
  105.     dc.w    $810A    ; CURSOR/Relative/Next line * 1
  106.  
  107.     dc.w    $0014    ; DISPLAY/Set data type/Words
  108.     dc.w    89    ; */Convert specific EA''s/Cvert W/base 1
  109.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  110.     MKSTR    <ws_GameLoader>
  111.     dc.w    434    ; CURSOR/Copy/Clip #1
  112.     dc.w    $0040    ; CURSOR/Absolute/Forward reference
  113.     dc.w    $001D    ; LABELS/Create single/Label
  114.     MKSTR    <slv_GameLoader>
  115.     dc.w    774    ; PROJECT/Disassemble
  116.     dc.w    437    ; CURSOR/Paste/Clip #1
  117.     dc.w    $810A    ; CURSOR/Relative/Next line * 1
  118.  
  119.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  120.     MKSTR    <ws_CurrentDir>
  121.     dc.w    $810A    ; CURSOR/Relative/Next line * 1
  122.  
  123.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  124.     MKSTR    <ws_DontCache>
  125. *    dc.w    $810A    ; CURSOR/Relative/Next line * 1
  126.  
  127.     dc.w    21    ; CURSOR/Absolute/Start of file
  128.     dc.w    0
  129. .macroend
  130. ************************************************************************
  131. _DisassembleSlave4
  132.     dc.l    MN_DisassembleSlave4
  133.     dc.l    .macroend-.macrostart
  134.     dc.b    'Disassemble Slave 4-7   '
  135. .macrostart
  136.     dc.w    $0328-40+MN_DisassembleSlave1    ; MACROS/Execute/
  137.     dc.w    21    ; CURSOR/Absolute/Start of file
  138.     dc.w    $8a0A    ; CURSOR/Relative/Next line * 10
  139.  
  140.     dc.w    23    ; DISPLAY/Set data type/Byte
  141.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  142.     MKSTR    <ws_keydebug>
  143.     dc.w    $810A    ; CURSOR/Relative/Next line * 1
  144.  
  145.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  146.     MKSTR    <ws_keyexit>
  147. *    dc.w    $810A    ; CURSOR/Relative/Next line * 1
  148.  
  149.     dc.w    21    ; CURSOR/Absolute/Start of file
  150.     dc.w    0
  151. .macroend
  152. ************************************************************************
  153. _DisassembleSlave8
  154.     dc.l    MN_DisassembleSlave8
  155.     dc.l    .macroend-.macrostart
  156.     dc.b    'Disassemble Slave 8-9   '
  157. .macrostart
  158.     dc.w    $0328-40+MN_DisassembleSlave4    ; MACROS/Execute/
  159.     dc.w    21    ; CURSOR/Absolute/Start of file
  160.     dc.w    $8c0A    ; CURSOR/Relative/Next line * 12
  161.  
  162.     dc.w    $0013    ; DISPLAY/Set data type/Longs
  163.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  164.     MKSTR    <ws_ExpMem>
  165. *    dc.w    $810A    ; CURSOR/Relative/Next line * 1
  166.  
  167.     dc.w    21    ; CURSOR/Absolute/Start of file
  168.     dc.w    0
  169. .macroend
  170. ************************************************************************
  171. _DisassembleSlave10
  172.     dc.l    MN_DisassembleSlave10
  173.     dc.l    .macroend-.macrostart
  174.     dc.b    'Disassemble Slave 10-15 '
  175. .macrostart
  176.     dc.w    $0328-40+MN_DisassembleSlave8    ; MACROS/Execute/
  177.     dc.w    21    ; CURSOR/Absolute/Start of file
  178.     dc.w    $8d0A    ; CURSOR/Relative/Next line * 13
  179.  
  180.     dc.w    $0014    ; DISPLAY/Set data type/Words
  181.     dc.w    89    ; */Convert specific EA''s/Cvert W/base 1
  182.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  183.     MKSTR    <ws_name>
  184.     dc.w    $0040    ; CURSOR/Absolute/Forward reference
  185.     dc.w    $001D    ; LABELS/Create single/Label
  186.     MKSTR    <slv_name>
  187.     dc.w    $000B    ; DISPLAY/Set data type/ASCII
  188.     dc.w    $003F    ; CURSOR/Absolute/Previous location
  189.     dc.w    $810A    ; CURSOR/Relative/Next line * 1
  190.  
  191.     dc.w    89    ; */Convert specific EA''s/Cvert W/base 1
  192.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  193.     MKSTR    <ws_copy>
  194.     dc.w    $0040    ; CURSOR/Absolute/Forward reference
  195.     dc.w    $001D    ; LABELS/Create single/Label
  196.     MKSTR    <slv_copy>
  197.     dc.w    $000B    ; DISPLAY/Set data type/ASCII
  198.     dc.w    $003F    ; CURSOR/Absolute/Previous location
  199.     dc.w    $810A    ; CURSOR/Relative/Next line * 1
  200.  
  201.     dc.w    89    ; */Convert specific EA''s/Cvert W/base 1
  202.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  203.     MKSTR    <ws_info>
  204.     dc.w    $0040    ; CURSOR/Absolute/Forward reference
  205.     dc.w    $001D    ; LABELS/Create single/Label
  206.     MKSTR    <slv_info>
  207.     dc.w    $000B    ; DISPLAY/Set data type/ASCII
  208.     dc.w    $003F    ; CURSOR/Absolute/Previous location
  209. *    dc.w    $810A    ; CURSOR/Relative/Next line * 1
  210.  
  211.     dc.w    21    ; CURSOR/Absolute/Start of file
  212.     dc.w    0
  213. .macroend
  214. ************************************************************************
  215. _DisassembleSlave16
  216.     dc.l    MN_DisassembleSlave16
  217.     dc.l    .macroend-.macrostart
  218.     dc.b    'Disassemble Slave 16    '
  219. .macrostart
  220.     dc.w    $0328-40+MN_DisassembleSlave10    ; MACROS/Execute/
  221.     dc.w    21    ; CURSOR/Absolute/Start of file
  222.     dc.w    $900A    ; CURSOR/Relative/Next line * 16
  223.  
  224.     dc.w    $0014    ; DISPLAY/Set data type/Words
  225.     dc.w    89    ; */Convert specific EA''s/Cvert W/base 1
  226.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  227.     MKSTR    <ws_kickname>
  228.     dc.w    $0040    ; CURSOR/Absolute/Forward reference
  229.     dc.w    $001D    ; LABELS/Create single/Label
  230.     MKSTR    <slv_kickname>
  231.     dc.w    $000B    ; DISPLAY/Set data type/ASCII
  232.     dc.w    $003F    ; CURSOR/Absolute/Previous location
  233.     dc.w    $810A    ; CURSOR/Relative/Next line * 1
  234.  
  235.     dc.w    $0013    ; DISPLAY/Set data type/Longs
  236.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  237.     MKSTR    <ws_kicksize>
  238.     dc.w    $810A    ; CURSOR/Relative/Next line * 1
  239.  
  240.     dc.w    $0014    ; DISPLAY/Set data type/Words
  241.     dc.w    $001E    ; LABELS/Create single/End-of-line comment
  242.     MKSTR    <ws_kickcrc>
  243. *    dc.w    $810A    ; CURSOR/Relative/Next line * 1
  244.  
  245.     dc.w    21    ; CURSOR/Absolute/Start of file
  246.     dc.w    0
  247. .macroend
  248. ************************************************************************
  249. _DisassembleSlaveData
  250.     dc.l    MN_DisassembleSlaveData
  251.     dc.l    .macroend-.macrostart
  252.     dc.b    'Disassemble Slave Data  '
  253. .macrostart
  254.     dc.w    21    ; CURSOR/Absolute/Start of file
  255.     dc.w    $880A    ; CURSOR/Relative/Next line * 8
  256.     dc.w    89    ; */Convert specific EA''s/Cvert W/base 1
  257.     dc.w    $0040    ; CURSOR/Absolute/Forward reference
  258.     dc.w    $001D    ; LABELS/Create single/Label
  259.     MKSTR    <slv_CurrentDir>
  260.     dc.w    $000B    ; DISPLAY/Set data type/ASCII
  261.     dc.w    21    ; CURSOR/Absolute/Start of file
  262.     dc.w    0
  263.     CNOP    0,4    ; !!! Last Macro must be LONGWORD ALIGEND !!!
  264. .macroend
  265. ************************************************************************
  266. * Execute Macro Table
  267.     IFEQ 1
  268.     dc.w    $002F    ; MACROS 1/Execute/(#1)
  269.     dc.w    $0031    ; MACROS 1/Execute/(#2)
  270.     dc.w    $0033    ; MACROS 1/Execute/(#3)
  271.     dc.w    $0158    ; MACROS 1/Execute/(#4)
  272.     dc.w    $015A    ; MACROS 1/Execute/(#5)
  273.     dc.w    $015C    ; MACROS 1/Execute/(#6)
  274.     dc.w    $015E    ; MACROS 1/Execute/(#7)
  275.     dc.w    $0160    ; MACROS 1/Execute/(#8)
  276.     dc.w    $0162    ; MACROS 1/Execute/(#9)
  277.     dc.w    $0164    ; MACROS 1/Execute/(#10)
  278.     dc.w    $0166    ; MACROS 1/Execute/(#11)
  279.     dc.w    $0168    ; MACROS 1/Execute/(#12)
  280.     dc.w    $01E4    ; MACROS 1/Execute/(#13)
  281.     dc.w    $01E5    ; MACROS 1/Execute/(#14)
  282.     dc.w    $01E6    ; MACROS 1/Execute/(#15)
  283.     dc.w    $01E7    ; MACROS 1/Execute/(#16)
  284.     dc.w    $01E8    ; MACROS 1/Execute/(#17)
  285.     dc.w    $01E9    ; MACROS 1/Execute/(#18)
  286.     dc.w    $01EA    ; MACROS 1/Execute/(#19)
  287.     dc.w    $01EB    ; MACROS 2/Execute/(#1)
  288.     dc.w    $01EC    ; MACROS 2/Execute/(#2)
  289.     dc.w    $01ED    ; MACROS 2/Execute/(#3)
  290.     dc.w    $01EE    ; MACROS 2/Execute/(#4)
  291.     dc.w    $01EF    ; MACROS 2/Execute/(#5)
  292.     dc.w    $01F0    ; MACROS 2/Execute/(#6)
  293.     dc.w    $01F1    ; MACROS 2/Execute/(#7)
  294.     dc.w    $01F2    ; MACROS 2/Execute/(#8)
  295.     dc.w    $01F3    ; MACROS 2/Execute/(#9)
  296.     dc.w    $01F4    ; MACROS 2/Execute/(#10)
  297.     dc.w    $01F5    ; MACROS 2/Execute/(#11)
  298.     dc.w    $01F6    ; MACROS 2/Execute/(#12)
  299.     dc.w    $01F7    ; MACROS 2/Execute/(#13)
  300.     dc.w    $01F8    ; MACROS 2/Execute/(#14)
  301.     dc.w    $01F9    ; MACROS 2/Execute/(#15)
  302.     dc.w    $01FA    ; MACROS 2/Execute/(#16)
  303.     dc.w    $01FB    ; MACROS 2/Execute/(#17)
  304.     dc.w    $01FC    ; MACROS 2/Execute/(#18)
  305.     dc.w    $01FD    ; MACROS 2/Execute/(#19)
  306.     dc.w    $0323    ; MACROS 3/Execute/(#39)
  307.     dc.w    $0328    ; MACROS 3/Execute/(#2)
  308.     dc.w    $0329    ; MACROS 3/Execute/(#3)
  309.     dc.w    $032A    ; MACROS 3/Execute/(#4)
  310.     dc.w    $032B    ; MACROS 3/Execute/(#5)
  311.     dc.w    $032C    ; MACROS 3/Execute/(#6)
  312.     dc.w    $032D    ; MACROS 3/Execute/(#7)
  313.     dc.w    $032E    ; MACROS 3/Execute/(#8)
  314.     dc.w    $032F    ; MACROS 3/Execute/(#9)
  315.     dc.w    $0330    ; MACROS 3/Execute/(#10)
  316.     dc.w    $0331    ; MACROS 3/Execute/(#11)
  317.     dc.w    $0332    ; MACROS 3/Execute/(#12)
  318.     dc.w    $0333    ; MACROS 3/Execute/(#13)
  319.     dc.w    $0334    ; MACROS 3/Execute/(#14)
  320.     dc.w    $0335    ; MACROS 3/Execute/(#15)
  321.     dc.w    $0336    ; MACROS 3/Execute/(#16)
  322.     dc.w    $0337    ; MACROS 3/Execute/(#17)
  323.     dc.w    $0338    ; MACROS 3/Execute/(#18)
  324.     dc.w    $0339    ; MACROS 3/Execute/(#19)
  325.     ENDC
  326.